menuitem: don't request twice the padding for separator menu items
authorCosimo Cecchi <cosimoc@gnome.org>
Thu, 15 Dec 2011 11:33:50 +0000 (12:33 +0100)
committerCosimo Cecchi <cosimoc@gnome.org>
Thu, 15 Dec 2011 17:52:30 +0000 (18:52 +0100)
Padding was requested twice for separator menu items.

https://bugzilla.gnome.org/show_bug.cgi?id=666242

gtk/gtkmenuitem.c

index d801d8662bbfd9c0180077f57620b5a2d2a69c4c..46491474a43eed79e37bde35d15411d269e7df50 100644 (file)
@@ -941,11 +941,10 @@ gtk_menu_item_get_preferred_height (GtkWidget *widget,
                             NULL);
 
       if (wide_separators)
-        min_height += separator_height + padding.top;
-      else
-        min_height += padding.top + padding.bottom;
-
-      nat_height = min_height;
+        {
+          min_height += separator_height;
+          nat_height += separator_height;
+        }
     }
 
   accel_width = 0;
@@ -1068,11 +1067,10 @@ gtk_menu_item_get_preferred_height_for_width (GtkWidget *widget,
                             NULL);
 
       if (wide_separators)
-        min_height += separator_height + padding.top;
-      else
-        min_height += padding.top + padding.bottom;
-
-      nat_height = min_height;
+        {
+          min_height += separator_height;
+          nat_height += separator_height;
+        }
     }
 
   if (minimum_size)